AssociationExample
by Mai Nguyen, NeXT Developer Support Team

Overview
This is a twin example to the Oracle AssociationExample. To be used by Sybase developers.
The current version of DBKit does not provide a way to filter the records fetched by a detail FetchGroup. DBKit does not allow a qualifier to be built into a relationship, nor does it allow a qualifier to be permanently attached to a FetchGroup. The Association example provides a way to do filtering of detail records by using a subclass of DBAssociation that replaces the default association which exists between the master FetchGroup and the detail FetchGroup. In this example, the user can change the criteria of the qualifier by entering a new value in the quantity field and pressing the Fetch: button. The example is built such that you can easily reuse the object QualifiedAssociation in your custom application.
In order to run this application, you need to have access to a Sybase server and a pubs demo database as described in the SybaseDemo.dbmodela model file.

Program Organization

Major Classes in the Application

Controller	A general tester object.  This object is for testing whether the custom association works 	properly. It is managing the UI of this example.

 QualifiedAssocition	A subclass of  DBAssociation. It overrides the method called when fetching, and add some new methods for setting up the proper qualifier. 

Topics Of Interest

- How to set up a new DBAssociation between the master fetchgroup and the detail fetchgroup 
See the C function  setUpAssociaiton() in the file QualifiedAssociation.m.

Last Edited: March 1993